﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

#region License
/*
 *  Copyright (c) Dumuzi.cn 2009 , All rights reserved.
 *  CLR Version: 2.0.50727.4927
 *  NameSpace: Summer.IO
 *  Author:Edwin Tai,戴佳顺
 *  Msn:edwin19861218@hotmail.com
 *  QQ: 1961218
 *  Date:2009/10/29 20:53:16
 *  Licensed under the Microsoft Public License (Ms-PL)
 *  This license governs use of the accompanying software. 
 *  If you use the software, you accept this license.
 *  If you do not accept the license, do not use the software.
 */
#endregion

namespace Summer.IO
{
    /// <summary>
    /// The interface is to define all the parser about file in the framework
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IParser<T> where T : IParseableFile 
    {
        /// <summary>
        /// Load file or throw exception if not exist
        /// </summary>
        /// <param name="path">The full path of file</param>
        /// <returns>T</returns>
         T Load(string path);
        /// <summary>
        /// Save T to file
        /// </summary>
        /// <param name="t">T</param>
        /// <param name="path">file path to save</param>
         void Save(T t,string path);
    }
}
